package com.ruicar.afs.cloud.common.mq.rabbit.fallback;

import lombok.extern.slf4j.Slf4j;

/**
 * The type DefaultFailFallBack
 * <p>Description: </p>
 *
 * @author Fzero
 * @version 1.0
 * @date Created on 2020.06.11 16:32:26
 * @since 1.0
 */
@Slf4j
public class DefaultFallBack implements SendFallBack {
    @Override
    public void errorHandler(int code, String exchange, String routeKey, String message) {
        log.error("mq->发送消息失败\ncode:{}\nexchange:{}\nrouterKey{}\n消息内容:{}", code, exchange, routeKey, message);
    }

    @Override
    public void successHandler(int code, String exchange, String routeKey, String message) {
        log.error("mq->发送消息成功\ncode:{}\nexchange:{}\nrouterKey{}\n消息内容:{}", code, exchange, routeKey, message);
    }
}
